home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 52
/
Amiga Format AFCD52 (Issue 136, May 2000).iso
/
-screenplay-
/
shareware
/
awinquake
/
awinquake_src.readme
< prev
next >
Wrap
Text File
|
2000-02-29
|
6KB
|
160 lines
Short: Source code of awinquake 0.5, a68k/ppc
Author: Peter McGavin (p.mcgavin@irl.cri.nz)
Uploader: Peter McGavin (p.mcgavin@irl.cri.nz)
Version: 0.5
Type: game/shoot
This archive contains the SAS/C Amiga source code of awinquake and
awinquakeppc 0.4. You don't need it to play winquake or awinquakeppc,
only if you want to try and compile it or look at how it works.
awinquake was derived from the original ID Software Linux winquake
source which you can download from:
ftp://ftp.cdrom.com/pub/idgames/idstuff/source/q1source.zip
My modified source code should still compile for Linux (APUS),
Solaris, Win95, etc, with no changes --- untested. All winquake
support files for those platforms are included in this archive,
even though they are not used by the Amiga version.
------------------------------------------------------------------------
v0.5 30 Jan 2000
sys_amiga.c: Memory heap was allocated twice. Oops. Fixed.
sys:amiga.c: Fixed return value of main().
in_amiga.c: Added joypad support and improved mouse support using
Jarmo Laukkonen's WarpQuake source code as an example. Variable
mouse_has_moved is set in vid_amiga.c.
Tried compiling WarpOS PPC version with StormC. Changes required:
common.h: redefine qboolean, false and true
console.c: use fopen(), fwrite(), fclose(), remove() instead of
open(), write(), close(), unlink().
net.h, net_main.c, net_dgrm.c: use prototypes for procedure function
variable.
Copied writechunkypixels_stub.c, cybergraphics_protos_stub.c,
cdplayer_protos_stub.c and lowlevel_protos_stub.c from other projects.
Created project file awinquakewos.¶. The smakefile also works.
StormC version works, but rather slow.
Tried compiling WarpOS PPC version with vbcc. Changes required:
All *.c and *.h files: Remove ^Ms with dos2unix.
console.c, sys_amiga.c, vid_amiga.c and cd_amiga.c: Various #ifdef __VBCC__
r_alias.c: vbccwos generates bad code for the assignment "pauxverts =
&auxverts[0]" in R_AliasDrawModel. As a workaround, made auxverts[]
static for vbcc in r_alias.c.
sys_amiga.c: vbcc incorrectly parses the double constant 4294967296.0
in source code. Replaced with (2147483648.0 + 2147483648.0).
For vbccwos, compiled a few inner-loop files with -O3. However vbcc
generated bad code for r_draw.c and maybe r_bsp.c at that level of
optimisation. Compiled most files for vbccwos with -O1.
mathlib.c: Both StormC and VBCC rounded results differently to SAS/C,
gcc and EGCS in anglemod(). The result was the player's view slowly
drifted when compiled with StormC or VBCC. Made correction in
anglemod().
------------------------------------------------------------------------
v0.4 11 Jan 2000
vid_amiga.c: Call cybergraphics.library WritePixelArray() instead of
WriteChunkyPixels() under KS3.0 (provided cgx lib is open).
sys_amiga.c: PPCGetAttr (PPCINFOTAG_CPUPLL) appears to return the PLL
code in the high nibble. Calculated bus speed is more likely to be
right now.
common.c and host.c: Made more changes to handling of ':' and '/' and
directory paths.
Created in_amiga.c from in_null.c. Support -mouse and -mousepointer.
Changes to IDCMP message handling in vid_amiga.c.
sys_amiga.c: Changed handling of PLL for calculating bus speed.
Hopefully it's right now.
sys_amiga.c: Call Host_Shutdown() on exit. Config.cfg is written now.
------------------------------------------------------------------------
v0.3 4 Jan 2000
v0.2 called BestCModeIDTags() even if cybergraphics.library failed to
open. That caused crashes and other problems on Amigas without
cybergraphics.library.
The SAS/C __AMIGADATE__ macro generates the string (4/1/0) for 4th Jan
2000, instead of (4/1/100).
------------------------------------------------------------------------
v0.2 30 Dec 1999
Wrote sys_amiga.c, vid_amiga.c, snd_amiga.c, cd_amiga.c and
net_amigaudp.c starting with copies of sys_null.c, vid_null.c,
snd_null.c, cd_null.c and net_udp.c, mainly by cutting and pasting
from other projects.
Created smakefile.
PPC assembly files copied from other projects are: amiga_timer.s,
amiga_cgxtagfns.s and amiga_socket_lib.s. Also created
cdplayer_pragmas.h. It goes in ppcinclude:ppcpragmas.
Used includes and libs from SDKs for cybergraphics, AmiTCP and
cdplayer.library, all on Aminet.
d_edge.c: commented out declaration of screenwidth (conflict with
declaration in r_main.c).
d_local.h: made sadjust, tadjust, bbextents, bbextentt and prealspandrawer
all extern to avoid duplicate definitions of symbols.
chase.c: declared SV_RecursiveHullCheck as extern.
host_cmd.c: declared SV_SaveSpawnparms as extern.
net_dgrm.c: don't #define BAN_TEST
common.c: deal with '/' in filenames in calls to COM_AddGameDirectory()
SAS/C 6.58 appears to generate bad code for R_TransformFrustum() in
r_misc.c when optimisations are turned on. Split r_misc.c into 2
separate files, r_misc1.c and r_misc2.c, the latter containing only
R_TransformFrustum(). Compiled r_misc2.c as a special case without
optimisation.
Had a lot of trouble debugging amigaudp networking code. Tracked down
2 problems after a full day of debugging. The first was that the
wrong errno variable was being picked up. Replaced references to
errno with calls to bsdsocket.library Errno(). The 2nd problem was in
UDP_AddrCompare(). The original code compared addr1->sa_family with
addr2->sa_family. Because of the way chars are aligned in the
sockaddr_in structure, this included an uninitialised byte. Changed
to compare ((struct sockaddr_in *)addr)->sin_family instead. Finished
up changing all occurrences of addr->sa_family to ((struct sockaddr_in
*)addr)->sin_family.
Compiled some low-level rendering modules with ppc-amigaos-gcc instead
of scppc. Overall speed increased by about 3%. Discovered that
R_DrawSolidClippedSubmodelPolygons() was truncated by scppc to
R_DrawSolidClippedSubmodelPolygo() and wouldn't link with untruncated
references generated by ppc-amigaos-gcc. Fixed by truncating the name
in the source code in r_bsp.c, r_main.c and r_local.h.